﻿<?php
	//error_reporting(E_ALL & ~E_NOTICE);
	//ini_set("display_errors",1);
class configuracion {
	
	public $pathServer;
	public $pathAdministrador;
	public $pathUsuari;
	public $pathDesatesa;
	public $relativo;
    public $pathGreyBox;
    public $pathSession;
    public $numMensajes; //Número de mensajes que se mostrarán en la página inicial.
    public $esperaComprobacion; //Tiempo en microsegundos que esperará el script daemon para comprobar datos.
    public $esperaInterrupcion; //Tiempo en segundos que esperará el script daemon para gestionar una interrupción.
	public $llaveMaestra;   //Valor del RFID maestro quepermite desbloquear y bloquearun coche.

        //configuracion thising...
    public $SMTPAuth;
    public $SMTPSecure;
    public $Host;
    public $Port;
    public $Username;
    public $Password;
        //
    public $From;
    public $FromName;
		
	//
	public $iat;
	public $minimoBateria;
	public $max_fichero;
        
	public function configuracion() {
		$this->relativo="./";
		$this->pathAdministrador=$this->relativo."administrador";
		$this->pathUsuari=$this->relativo."cliente";
		$this->pathDesatesa=$this->relativo."desatendida";
                //$this->pathGreyBox=$path_tmp."../administrador";
                $this->pathSession=$this->relativo."login_session";
                $this->numMensajes=50;
                $this->esperaComprobacion=1;
				 $this->pathServer="http://www.ibilek.es";
                $this->esperaInterrupcion=180;
                $this->llaveMaestra="15333444";
                $this->llaveMaestra2="12345678";
                $this->llaveMaestra3="87654321";

                //configuracion email..
                //configuracion email..
                $this->SMTPAuth = true;
                $this->SMTPSecure = "ssl";
                $this->Host = "smtp.gmail.com";
                $this->Port = 465;
                $this->Username = "ibilek@ibil.es";
                $this->Password = "ibilek_ibil_2011";
                //
                $this->From = "pruebastsi@gmail.com";
                $this->FromName = "Servicio Ibilek";
				
		$this->clave_sms  = "iBiLek50";
		$this->server_sms = "https://extranet2.euskaltel.es:543/CanalWeb/platsmsgest/sms/?receptor=Proceso";
		$this->remitente_sms = "Ibilek";


	}
	
	public function getRelativo() {
		return ($this->relativo);
	}
	
	public function getConfigBBDD(){
		include_once $this->relativo.'tmp/consultasBBDDSareCar.class.php';
		$bd = new consultasBBDDSareCar();
		$ret = $bd->query("SELECT * FROM config_sarecar");
		$r = mysql_fetch_array($ret);
		
		$this->iat 			 = $r['intervalo_alarma_tiempo'];
		$this->minimoBateria = $r['minimoBateria'];
		$this->max_fichero   = $r['max_file_size'];
				
	}
	
	public function toString(){
		return "configuracionCLI";
	}

}


?>
